<!DOCTYPE html>
<html>
<head>
	<meta name="viewport" content="width=device-width" />
	<link rel="shortcut icon" href="/static/images/favicon.ico">
	<meta http-equiv=Content-Type content="text/html;charset=utf-8">
	<title>webPan.py - Mini网盘</title>
</head>

<body>
<div id="show">{{url}}</div>
<script>
fileName="{{url}}"
var arr=fileName.split(/\./);
var suffix=arr[arr.length-1].toLowerCase();
var html="";

if( ['png', 'jpg','jpeg','bmp', 'gif', 'pdf', 'PDF', 'html', 'svg', 'mp3', 'mp4'].indexOf(suffix)>=0 ){
	//html="<img src='"+fileName+"'>";
	html='<meta http-equiv="refresh" content="0;url='+fileName+'">'
}
//else if( ['pdf'].indexOf(suffix)>=0 ){
	//html='<embed width="100%" height="100%" src="'+fileName+'"> </embed>'
	//html='<iframe src="'+fileName+'" width="800" height="600"></iframe> '
//}


if(html!=""){
	document.getElementById('show').innerHTML=html
}

console.log('html=', html)

</script>